package com.sunlands.qdcy.tongzhuo.feign;

import com.sunlands.qdcy.tongzhuo.config.OauthFeignConfig;
import com.sunlands.qdcy.tongzhuo.vo.BusinessResult;
import com.sunlands.qdcy.tongzhuo.vo.CheckVO;
import com.sunlands.qdcy.tongzhuo.vo.SocketParamVO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p></p>
 * <PRE>
 * <BR>    修改记录
 * <BR>-----------------------------------------------
 * <BR>    修改日期         修改人          修改内容
 * </PRE>
 *
 * @author zl
 * @version 1.0
 * @date Created in 2019/4/18 11:07
 * @copyright: Copyright (c) founders
 */
@FeignClient(name = "desk-mate-socket", configuration = OauthFeignConfig.class)
public interface SocketClient {

    /**
     * 通过长连接发送内容接口
     *
     * @param msgEntity
     * @return
     */
    @PostMapping(value = "/chat/send")
    BusinessResult sendMsg(@RequestBody SocketParamVO msgEntity);

    //目标id，例如：群id，房间id，如果是私聊，则为对方的用户id

    /**
     * 查询在线人员id接口
     *
     * @param destId
     * @return
     */
    @GetMapping(value = "/chat/userIdsOnline")
    BusinessResult onlineList(@RequestParam("destId") String destId);

    @PostMapping("/check/sensitive")
    BusinessResult checkContent(@RequestBody CheckVO checkVO);

    @PostMapping("/check/sensitive/replace")
    BusinessResult replaceContent(@RequestBody CheckVO checkVO);
}
